<?php
include('config.php');
$weight= 500;
$number_id = 45;
$where = "number_id={$number_id}";
$re = $mysql->selectList('stock_goods_log',$where);


	$id = $re[0]['stock_goods_id'];


	$num = $re[0]['stock_goods_num'];


	$weight = $num + $weight;

	$data = array('stock_goods_num'=>$weight);
	$where = "stock_goods_id={$id}";
	$res = $mysql->update('stock_goods_log', $where, $data);

	if($res){
		echo "1";
	}else{
		echo "-1";
	}
